function getNowTime() {
  let now = new Date();
  let year = now.getFullYear();
  let month = now.getMonth() + 1;
  let date = now.getDate();

  let hour = now.getHours();
  let minute = now.getMinutes();
  let second = now.getSeconds();
  // 前置补0 ?:是三元表达式，?前面是一个逻辑表达式
  // 如果是真，就执行:前面代码，否则执行:后面代码
  hour = hour < 10 ? '0' + hour : hour;
  minute = minute < 10 ? '0' + minute : minute;
  second = second < 10 ? '0' + second : second;
  month = month < 10 ? '0' + month : month;
  date = date < 10 ? '0' + date : date;

  return `${year}年${month}月${date}日 ${hour}:${minute}:${second}`;
}
